package cn.iocoder.yudao.framework.pay.core.client.impl.pax.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 支付币种
 */
public enum CurrencyEnum {
    USDT("USDT"), // USDT
    ;

    private final String value;

    CurrencyEnum(String value) {
        this.value = value;
    }

    // Jackson deserialization method
    @JsonCreator
    public static CurrencyEnum fromValue(String value) {
        for (CurrencyEnum status : CurrencyEnum.values()) {
            if (status.value.equalsIgnoreCase(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Invalid currency: " + value);
    }

    // Jackson serialization method
    @JsonValue
    public String getValue() {
        return value;
    }

}
